#include <stdio.h>
#include "oled.h"
#include "gui.h"
#include "test.h"
//16*16/8
// #define FONT_SIZE 32 //32 = 16*16/8
// unsigned char  font_array[][FONT_SIZE]={

    
void showText(int x,int y,int font_size,char *str){
    char *tmp_str = str;
    int cur_x=x;
    int cur_y=y;
    while(*tmp_str != '\0')
    {
        unsigned char csize = font_size;
        if(tmp_str[0] > 0){
           if(font_size == 16) {
                csize = font_size/2;
            }else if(font_size == 8){
                csize = font_size/2+2;
            }
      
            GUI_ShowChar(cur_x,cur_y,tmp_str[0],font_size,1);
            tmp_str++;
        }else{
            if(font_size == 16){
                GUI_ShowFont16(cur_x,cur_y,tmp_str,1);
            }else if(font_size == 24){
                //参照showChinese自己实现
            }
            tmp_str +=3;
        
        }
        
        cur_x += csize;
        if(cur_x > WIDTH-font_size)
		{
			cur_x=0;
			cur_y+=font_size;
		}
    }
}


// const unsigned char logo[]  = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xff,0xff,0xff,0xf8,0x01,0xc0,0x00,0x00,0x00,0xf0,0x7f,0xff,0xff,0xc0,0x00,0x01,0xff,0xff,0xff,0xff,0x03,0xe0,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xfe,0x00,0x01,0xff,0xff,0xff,0xff,0x83,0xe0,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0x80,0x01,0xff,0xff,0xff,0xff,0xc3,0xe0,0x00,0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xc0,0x00,0x00,0x00,0x00,0x03,0xc3,0xe0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x07,0xc0,0x00,0x00,0x00,0x00,0x03,0xc3,0xe0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x03,0xe0,0x00,0x00,0x00,0x00,0x07,0xc3,0xe0,0x00,0x00,0x00,0xf0,0x00,0x00,0x00,0x01,0xe0,0x01,0xff,0xff,0xff,0xff,0x83,0xff,0xfe,0x7f,0xff,0xf0,0x00,0x00,0x00,0x00,0xe0,0x01,0xff,0xff,0xff,0xff,0x81,0xff,0xfe,0x7f,0xff,0xf0,0x00,0x00,0x00,0x01,0xf0,0x01,0xff,0xff,0xff,0xff,0xc1,0xff,0xfe,0x7f,0xff,0xe0,0x00,0x00,0x00,0x01,0xe0,0x00,0x00,0x00,0x00,0x07,0xc0,0x7f,0xfe,0x7f,0xff,0xc0,0x00,0x00,0x00,0x01,0xe0,0x00,0x00,0x00,0x00,0x03,0xc0,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x03,0xe0,0x00,0x00,0x00,0x00,0x03,0xc0,0x00,0x00,0x78,0x00,0x00,0x00,0x00,0x00,0x07,0xc0,0x01,0xff,0xff,0xff,0xff,0xc0,0x00,0x00,0x78,0x00,0x00,0x7f,0xff,0xff,0xff,0xc0,0x01,0xff,0xff,0xff,0xff,0x80,0x00,0x00,0x78,0x00,0x00,0xff,0xff,0xff,0xff,0x00,0x01,0xff,0xff,0xff,0xfe,0x00,0x00,0x00,0x78,0x00,0x00,0xff,0xff,0xff,0xfe,0x00,0x01,0x80,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x86,0x00,0x00,0xff,0xf8,0x00,0x30,0x20,0x00,0x0c,0x60,0x00,0x00,0x30,0x00,0x01,0x86,0x00,0x00,0xff,0xf8,0x00,0x19,0xec,0x00,0x0e,0xff,0x80,0x03,0xff,0xc0,0x01,0x86,0x30,0x00,0x0c,0x80,0x00,0x1b,0xfe,0x00,0x02,0xc0,0x00,0x03,0xff,0xe0,0x01,0x86,0xe0,0x00,0x4c,0x88,0x00,0x03,0x26,0x00,0x01,0xff,0x00,0x00,0xc8,0x00,0x01,0xf7,0xc0,0x00,0xcc,0x98,0x00,0x3b,0x26,0x00,0x1d,0x7f,0x00,0x01,0x88,0x00,0x01,0x97,0x80,0x00,0x6c,0x98,0x00,0x3b,0xfe,0x00,0x0e,0x00,0x00,0x01,0x88,0x00,0x01,0x86,0x00,0x00,0x6c,0x90,0x00,0x1b,0xfe,0x00,0x01,0xfe,0x00,0x01,0xff,0xc0,0x01,0x86,0x00,0x00,0x2c,0xb0,0x00,0x1b,0x26,0x00,0x00,0x06,0x00,0x00,0x08,0x00,0x01,0x86,0x10,0x00,0x3c,0xe0,0x00,0x1b,0x26,0x00,0x06,0x06,0x00,0x00,0x08,0x00,0x01,0x96,0x30,0x00,0x0c,0x80,0x00,0x1b,0xfe,0x00,0x04,0x06,0x80,0x07,0xff,0xe0,0x01,0xf6,0x30,0x00,0x0c,0x80,0x00,0x18,0x00,0x00,0x0c,0x06,0x80,0x07,0xff,0xe0,0x01,0xe7,0xf0,0x00,0xff,0xfc,0x00,0x3f,0xfe,0x00,0x0c,0x03,0x80,0x00,0x08,0x00,0x01,0x03,0xe0,0x00,0x00,0x00,0x00,0x27,0xfe,0x00,0x08,0x03,0x80,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 };
// const unsigned char bird[] = { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x00,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe3,0xfd,0x0f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc7,0xff,0xc3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xff,0xf1,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x7f,0xff,0xf8,0xff,0xff,0xff,0xff,0xe0,0x0f,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0xff,0xff,0xfc,0xff,0xff,0xff,0xff,0x0f,0x83,0xff,0xff,0xff,0xff,0xff,0xff,0xfd,0xff,0xcf,0xfe,0x7f,0xff,0xff,0xfc,0xff,0x01,0xff,0xff,0xff,0xff,0xff,0xff,0xe3,0xff,0xcf,0xff,0x3f,0xff,0xff,0xf3,0xfc,0xe9,0xff,0xff,0xff,0xff,0xff,0xff,0xcf,0xff,0xff,0xff,0x3f,0xff,0xff,0xcf,0xfb,0xdd,0xff,0xff,0xff,0xff,0xff,0xff,0xbf,0xff,0xff,0xff,0x3f,0xff,0xff,0x3f,0xf7,0xbd,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xbf,0xff,0xfe,0x7f,0xcf,0x79,0xff,0xff,0xff,0xff,0xff,0xff,0x18,0xff,0xff,0xff,0xbf,0xff,0xfd,0xff,0x9e,0xf3,0xff,0xff,0xff,0xff,0xff,0xff,0x84,0xff,0xff,0xff,0xbf,0xff,0xf9,0xfe,0x7d,0xf7,0xff,0xff,0xe7,0xff,0xff,0xff,0xf0,0xff,0xff,0xff,0xbf,0xff,0xfb,0xfc,0xf3,0xef,0xff,0xff,0x97,0xff,0xff,0xff,0xfe,0x7f,0xff,0xff,0xbf,0xff,0xf7,0xfb,0xef,0xdf,0xff,0xff,0x37,0xff,0xff,0xff,0xfe,0x7f,0xff,0xff,0xbf,0xff,0xf7,0xf7,0xdf,0xbf,0xff,0xfc,0xe7,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0x3f,0xff,0xef,0xef,0xbf,0x7f,0xff,0xf3,0xef,0xff,0xff,0xff,0xff,0x3f,0xff,0xff,0x7f,0xff,0xef,0xdf,0x7e,0xff,0xff,0xcf,0xef,0xff,0xff,0xff,0xff,0x9f,0xff,0xff,0x7f,0xff,0xcf,0xbe,0xfd,0xff,0xff,0x3f,0xcf,0xff,0xff,0xff,0xff,0xdf,0xff,0xfe,0xff,0xff,0xcf,0x3d,0xfd,0xff,0xfc,0x7f,0xdf,0xff,0xff,0xff,0xff,0xcf,0xff,0xfc,0xff,0xff,0xdf,0x7b,0xfb,0xff,0xe3,0xff,0x9f,0xff,0xff,0xff,0xff,0xe7,0xff,0xfd,0xff,0xff,0xdf,0xfb,0xf7,0xff,0x0f,0xff,0xbf,0xff,0xff,0xff,0xff,0xf3,0xff,0xf8,0xff,0xff,0xdf,0xff,0xe7,0xf8,0x7f,0xff,0x7f,0xff,0xff,0xff,0xff,0xf9,0xff,0xfc,0x3f,0xff,0xdf,0xff,0xe7,0x83,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xfc,0x01,0xff,0x00,0x3e,0x3f,0xff,0xe0,0x1f,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0x04,0xff,0xe0,0x00,0xff,0xff,0xff,0xff,0xff,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf9,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfb,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xdf,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xcf,0xff,0xff,0xff,0xff,0xff,0xff,0xf9,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xcf,0xff,0xff,0xff,0xff,0xff,0xff,0xe7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe7,0xff,0xff,0xff,0xff,0xff,0xff,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf3,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0xff,0xff,0xff,0xff,0xff,0xbc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0x3f,0xff,0xff,0xff,0xff,0x31,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x87,0xff,0xff,0xdf,0xff,0x87,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc1,0xff,0xff,0x3f,0xfe,0x1f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x7f,0xf8,0xff,0xe0,0xdf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x0f,0xe3,0xfe,0x0f,0xcf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x80,0x00,0x00,0xff,0xe7,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf8,0x00,0x1f,0xff,0xe3,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xc3,0xff,0xff,0xff,0xf0,0x0f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x1f,0xff,0xff,0xff,0xf3,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0x00,0x7f,0xff,0xff,0xff,0x83,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe5,0xff,0xff,0xff,0xfc,0x39,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x8d,0xff,0xff,0xff,0xe1,0xfd,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfe,0x39,0xff,0xff,0xff,0xcf,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfb,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff };
// const unsigned char bird2[] ={ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xff,0xff,0x03,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xff,0xf0,0x00,0x7f,0xff,0xf8,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xff,0xe3,0xfd,0x0f,0xff,0xf7,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xff,0xc7,0xff,0xc3,0xff,0xe7,0xcf,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xff,0x3f,0xff,0xf1,0xff,0xef,0xe7,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xfe,0x7f,0xff,0xf8,0xff,0xef,0xf7,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xfc,0xff,0xff,0xfc,0xff,0xef,0xb3,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xfd,0xff,0xcf,0xfe,0x7f,0xe7,0xbb,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xe3,0xff,0xcf,0xff,0x3f,0xf7,0xb9,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xcf,0xff,0xff,0xff,0x3f,0xf7,0xbd,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xbf,0xff,0xff,0xff,0x3f,0xf7,0xbe,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0x7f,0xff,0xff,0xff,0xbf,0xf7,0xbe,0x7f,0xff,0xff,0xff,0xff,0xff,0xe0,0x18,0xff,0xff,0xff,0xbf,0xf3,0xbf,0x3f,0xff,0xff,0xff,0xff,0xff,0xe0,0x84,0xff,0xff,0xff,0xbf,0xfb,0xdf,0xbf,0xff,0xff,0xff,0xff,0xe7,0xe0,0xf0,0xff,0xff,0xff,0xbf,0xfb,0xdf,0xdf,0xff,0xff,0xff,0xff,0x97,0xe0,0xfe,0x7f,0xff,0xff,0xbf,0xf9,0xdf,0xcf,0xff,0xff,0xff,0xff,0x37,0xe0,0xfe,0x7f,0xff,0xff,0xbf,0xfd,0xef,0xe7,0xff,0xff,0xff,0xfc,0xe7,0xe0,0xff,0x7f,0xff,0xff,0x3f,0xfc,0xe7,0xf7,0xff,0xff,0xff,0xf3,0xef,0xe0,0xff,0x3f,0xff,0xff,0x7f,0xfe,0xf7,0xfb,0xff,0xff,0xff,0xcf,0xef,0xe0,0xff,0x9f,0xff,0xff,0x7f,0xfe,0x73,0xf9,0xff,0xff,0xff,0x3f,0xcf,0xe0,0xff,0xdf,0xff,0xfe,0xff,0xff,0x7b,0xfe,0xff,0xff,0xfc,0x7f,0xdf,0xe0,0xff,0xcf,0xff,0xfc,0xff,0xff,0x39,0xfb,0x7f,0xff,0xe3,0xff,0x9f,0xe0,0xff,0xe7,0xff,0xfd,0xff,0xff,0xbc,0xfb,0xbf,0xff,0x0f,0xff,0xbf,0xe0,0xff,0xf3,0xff,0xf8,0xff,0xff,0x9e,0x7f,0xc7,0xf8,0x7f,0xff,0x7f,0xe0,0xff,0xf9,0xff,0xfc,0x3f,0xff,0xdf,0x3f,0xe7,0x83,0xff,0xff,0x7f,0xe0,0xff,0xfc,0x01,0xff,0x00,0x3e,0x3f,0x87,0xe0,0x1f,0xff,0xfe,0xff,0xe0,0xff,0xff,0x04,0xff,0xe0,0x00,0xff,0xff,0xff,0xff,0xff,0xfc,0xff,0xe0,0xff,0xff,0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf9,0xff,0xe0,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xfb,0xff,0xe0,0xff,0xff,0xfe,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf7,0xff,0xe0,0xff,0xff,0xfe,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xdf,0xff,0xe0,0xff,0xff,0xfe,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x9f,0xff,0xe0,0xff,0xff,0xff,0x3f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x7f,0xff,0xe0,0xff,0xff,0xff,0x9f,0xff,0xff,0xff,0xff,0xff,0xff,0xfc,0xff,0xff,0xe0,0xff,0xff,0xff,0xcf,0xff,0xff,0xff,0xff,0xff,0xff,0xf9,0xff,0xff,0xe0,0xff,0xff,0xff,0xcf,0xff,0xff,0xff,0xff,0xff,0xff,0xe7,0xff,0xff,0xe0,0xff,0xff,0xff,0xe7,0xff,0xff,0xff,0xff,0xff,0xff,0x9f,0xff,0xff,0xe0,0xff,0xff,0xff,0xf3,0xff,0xff,0xff,0xff,0xff,0xff,0x3f,0xff,0xff,0xe0,0xff,0xff,0xff,0xf8,0xff,0xff,0xff,0xff,0xff,0xbc,0xff,0xff,0xff,0xe0,0xff,0xff,0xff,0xfc,0x3f,0xff,0xff,0xff,0xff,0x31,0xff,0xff,0xff,0xe0,0xff,0xff,0xff,0xff,0x87,0xff,0xff,0xdf,0xff,0x87,0xff,0xff,0xff,0xe0,0xff,0xff,0xff,0xff,0xc1,0xff,0xff,0x3f,0xfe,0x1f,0xff,0xff,0xff,0xe0,0xff,0xff,0xff,0xff,0xf8,0x7f,0xf8,0xff,0xe0,0xdf,0xff,0xff,0xff,0xe0,0xff,0xff,0xff,0xff,0xfe,0x0f,0xe3,0xfe,0x0f,0xcf,0xff,0xff,0xff,0xe0,0xff,0xff,0xff,0xff,0xff,0x80,0x00,0x00,0xff,0xe7,0xff,0xff,0xff,0xe0,0xff,0xff,0xff,0xff,0xff,0xf8,0x00,0x1f,0xff,0xe3,0xff,0xff,0xff,0xe0,0xff,0xff,0xff,0xff,0xff,0xc3,0xff,0xff,0xff,0xf0,0x0f,0xff,0xff,0xe0,0xff,0xff,0xff,0xff,0xff,0x1f,0xff,0xff,0xff,0xf3,0x9f,0xff,0xff,0xe0,0xff,0xff,0xff,0xe0,0x00,0x7f,0xff,0xff,0xff,0x83,0xff,0xff,0xff,0xe0,0xff,0xff,0xff,0xff,0xe5,0xff,0xff,0xff,0xfc,0x39,0xff,0xff,0xff,0xe0,0xff,0xff,0xff,0xff,0x8d,0xff,0xff,0xff,0xe1,0xfd,0xff,0xff,0xff,0xe0,0xff,0xff,0xff,0xfe,0x39,0xff,0xff,0xff,0xcf,0xff,0xff,0xff,0xff,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xe0 };
        extern float g_temp;
        extern float g_humi;
    char temp_str[40];
    char humi_str[40];
    char light_status[40]={0};
    char motor_status[40]={0};
void test_led_screen(void)
{	
  
    printf("before oled clear \r\n");
    OLED_Init();			   //初始化OLED  
    
    OLED_Clear(0);   
   
    int x=10;
    int y=10;

    // for(int i=0;i<20;i++)
    // {

    //     OLED_Clear(0); 
    //     x=x+5;
    //     y=y+2;
    //     GUI_DrawCircle(x, y, 1, 8);
    //     usleep(500*1000);

    while(1){
        OLED_Clear(0);  

        sprintf(temp_str,"温度:%.02f",g_temp);
        sprintf(humi_str,"湿度:%.02f",g_humi);
        sprintf(light_status,"电灯:%s",get_light_status()?"打开":"关闭");
        sprintf(motor_status,"风扇:%s",get_motor_status()?"打开":"关闭");
        showText(0,0,16,temp_str);
        showText(0,16,16,humi_str);
        showText(0,32,16,light_status);
        showText(0,48,16,motor_status);
        OLED_Display();
        sleep(3);
    }
   
    OLED_Display();
   
}

